<?php

class Sgit_Form_Element_Select_Xml extends Sgit_Form_Element_Select 
{

   public function __construct($name,$spec=null, $options = null,$filter=null,$where=null)
   {
        $select = new Zend_Config_Xml(APPLICATION_PATH."/configs/listas/$name.xml");
        $this->loadxml($select);
        if($select->options->firstBlank=='N') $spec['firstBlank']=false;
        parent::__construct($spec, $options,$filter,$where);
   }
   
   
   public function loadxml($select)
   {
            foreach($select->multioptions->option as $v){
                 $this->addMultiOption($v->key,$v->data);
            }
            $this->setLabel($select->options->label);
            $this->setName($select->name);
   }

}
